package com.github.kotvertolet.youtubejextractor.models.newModels;

import com.google.gson.annotations.SerializedName;
import ohos.utils.Parcel;
import ohos.utils.Sequenceable;

import java.io.Serializable;

/**
 * 类功能描述(类上)
 *
 * @author AnBetter
 * @since 2021-04-15
 */
public class CommandMetadata implements Sequenceable, Serializable {

    @SerializedName("webCommandMetadata")
    private WebCommandMetadata webCommandMetadata;

    public static final Sequenceable.Producer<CommandMetadata> CREATOR = new Producer<CommandMetadata>() {
        @Override
        public CommandMetadata createFromParcel(Parcel parcel) {
            // Initialize an instance first, then do customized unmarshlling.
            CommandMetadata commandMetadata = new CommandMetadata();
            commandMetadata.unmarshalling(parcel);
            return commandMetadata;
        }
    };

    @Override
    public boolean marshalling(Parcel parcel) {
        parcel.writeSequenceable(this.webCommandMetadata);
        return true;
    }

    @Override
    public boolean unmarshalling(Parcel parcel) {
        parcel.readSequenceable(this.webCommandMetadata);
        return true;
    }

    @Override
    public String toString() {
        return "CommandMetadata{" +
                "webCommandMetadata = '" + webCommandMetadata + '\'' +
                "}";
    }

    public WebCommandMetadata getWebCommandMetadata() {
        return webCommandMetadata;
    }

    public void setWebCommandMetadata(WebCommandMetadata webCommandMetadata) {
        this.webCommandMetadata = webCommandMetadata;
    }
}
